package com.chengcang.admin.modules.busi.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.chengcang.admin.modules.busi.dao.BusiOrderInvoiceHeadSnapshotDao;
import com.chengcang.admin.modules.busi.dto.orderSnapshotDTO.BusiOrderInvoiceHeadSnapshotDTO;
import com.chengcang.admin.modules.busi.entity.orderSnapshotEntity.BusiOrderInvoiceHeadSnapshotEntity;
import com.chengcang.admin.modules.busi.service.BusiOrderInvoiceHeadSnapshotService;
import com.chengcang.common.service.impl.CrudServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 发票抬头
 *
 * @author zhanli
 * @since 1.0.0 2023-01-09
 */
@Service
public class BusiOrderInvoiceHeadSnapshotServiceImpl extends CrudServiceImpl<BusiOrderInvoiceHeadSnapshotDao, BusiOrderInvoiceHeadSnapshotEntity, BusiOrderInvoiceHeadSnapshotDTO> implements BusiOrderInvoiceHeadSnapshotService {

    @Override
    public QueryWrapper<BusiOrderInvoiceHeadSnapshotEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<BusiOrderInvoiceHeadSnapshotEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }


}